from selenium.webdriver.common.by import By

class adminBasicInformationLocator:
    # account settings菜单
    account_settings_menu = (By.XPATH, '//div[contains(@data-menu-id,"ACCOUNT_SETTING_DIR")]/span')
    # bill菜单是否打开  class="antd4-menu antd4-menu-sub antd4-menu-inline" 即为打开
    if_open_account_setting_menu = (By.XPATH, '//div[contains(@data-menu-id,"ACCOUNT_SETTING_DIR")]/../ul')
    # basic information菜单
    basic_information_menu = (By.CSS_SELECTOR, '[path="/console/basicInformation"]')

    # phone number属性
    phone_number = (By.XPATH, '(//*[@class="antd4-descriptions-row"])/td/div/span[2]/span')
    # first name 属性
    first_name = (By.XPATH, '(//*[@class="antd4-descriptions-row"])[2]/td[1]/div/span/div')
    # last name属性
    last_name = (By.XPATH, '(//*[@class="antd4-descriptions-row"])[2]/td[2]/div/span/div')
    # post code属性
    post_code = (By.XPATH, '(//*[@class="antd4-descriptions-row"])[3]/td[1]/div/span/div')
    # country/region属性
    country_region = (By.XPATH, '(//*[@class="antd4-descriptions-row"])[3]/td[2]/div/span/div')
    # state/province属性
    state_province = (By.XPATH, '(//*[@class="antd4-descriptions-row"])[4]/td[1]/div/span/div')
    # city属性
    city = (By.XPATH,'(//*[@class="antd4-descriptions-row"])[4]/td[2]/div/span/div')
    # address属性
    address = (By.XPATH, '(//*[@class="antd4-descriptions-row"])[5]/td[1]/div/span/div')

    # 界面字段值
    phone_number_value = (By.XPATH, '/html/body/div[1]/section/section/main/div/div/div/div/div[2]/div/div/div/div[2]/div[2]/div/div/table/tbody/tr/td/div/span[2]/span')
    first_name_value = (By.XPATH, '/html/body/div[1]/section/section/main/div/div/div/div/div[2]/div/div/div/div[4]/div/table/tbody/tr[1]/td[1]/div/span[2]')
    post_code_value = (By.XPATH, '/html/body/div[1]/section/section/main/div/div/div/div/div[2]/div/div/div/div[4]/div/table/tbody/tr[2]/td[1]/div/span[2]')
    state_province_value =(By.XPATH, '/html/body/div[1]/section/section/main/div/div/div/div/div[2]/div/div/div/div[4]/div/table/tbody/tr[3]/td[1]/div/span[2]')
    address_value = (By.XPATH, '/html/body/div[1]/section/section/main/div/div/div/div/div[2]/div/div/div/div[4]/div/table/tbody/tr[4]/td/div/span[2]')
    last_name_value = (By.XPATH, '/html/body/div[1]/section/section/main/div/div/div/div/div[2]/div/div/div/div[4]/div/table/tbody/tr[1]/td[2]/div/span[2]')
    country_region_value = (By.XPATH, '/html/body/div[1]/section/section/main/div/div/div/div/div[2]/div/div/div/div[4]/div/table/tbody/tr[2]/td[2]/div/span[2]')
    city_value = (By.XPATH, '/html/body/div[1]/section/section/main/div/div/div/div/div[2]/div/div/div/div[4]/div/table/tbody/tr[3]/td[2]/div/span[2]')

    # phone edit按钮
    edit_phone_botton = (By.XPATH, '(//span[text() = "Edit"])[2]')
    # 身份验证码1
    identity_verification_code_input0 = (By.ID, 'creForm_verificationCode')
    # continue 按钮
    continue_botton0 = (By.XPATH, '//span[text() = "Continue"]')

    # 区号输入框
    area_code_input = (By.ID, 'creForm_areaCode')
    # 下拉列表的第一个选项+256
    area_code_result = (By.XPATH, '(//div[contains(@class,"antd4-select-item-option-content")])[1]')
    # 号码输入框
    phone_input = (By.ID, 'creForm_phoneNumber')
    # 身份验证码2
    identity_verification_code_input1 = (By.ID, 'creForm_verificationCode')
    # submit 按钮
    submit_botton0 = (By.XPATH, '//span[text() = "Submit"]')
    # 关闭窗口
    close_botton = (By.XPATH, '(//button[contains(@class,"antd4-modal-close")])[1]')


    # contact information edit按钮
    edit_contact_information_botton = (By.XPATH, '(//button[contains(@class,"antd4-btn antd4-btn-link")])[3]')
    # first name输入框
    first_name_input = (By.ID, 'firstName')
    # last name输入框
    last_name_input = (By.ID, 'lastName')
    # post code输入框
    post_code_input = (By.ID, 'postCode')
    # country/region输入框
    country_input = (By.ID, 'region')
    # country/region下拉框第一个选项  China
    country_reslut = (By.XPATH, "(//div[contains(@class,'antd4-select-item antd4-select-item-option antd4-select-item-option-active antd4-select-item-option-selected')])[1]")
    # state/province输入框
    state_input = (By.ID, 'state')
    # city输入框
    city_input = (By.ID, 'city')
    # address输入框
    address_input = (By.ID, 'address')
    # submit按钮
    submit_botton1 = (By.XPATH, '//span[text() ="Submit"]')

